<template>
	<view>
		<scroll-view scroll-x class="bg-white nav">
			<view class="main">
				<view class="main-box">
					<form>
						<view v-if="TabCur ==0" class="cg-main">
							<view class="">

								<view class="cu-form-group">
									<view class="title">单据日期：</view>
									<!-- <view @tap="open(1)" class="inpt1">
										<input disabled="true" :value="timeData.fulldate"></input>
									</view> -->
									<picker mode="date" :value="timeData.fulldate" @change="DateChangeStart">
										<view class="picker">
											{{timeData.fulldate}}
										</view>
									</picker>
								</view>
								<view class="cu-form-group">
									<view class="title">结束日期：</view>
									<!-- <view @tap="open(2)" class="inpt1">
										<input disabled="true" :value="timeData1.fulldate"></input>
									</view> -->
									<picker mode="date" :value="timeData1.fulldate" @change="DateChangeEnd">
										<view class="picker">
											{{timeData1.fulldate}}
										</view>
									</picker>
								</view>
								<view class="cu-form-group">
									<view class="title">审核状态:</view>
									<view class="inpt1">
										<view class="content_item" v-for="(item,index) in shStateList" 
										 @tap="clickcheckd(index)" :key="index">
											<!-- <jiuaiCheckbox @change='BarLikeCode' :value="item.state" :checked="item.state" :index="index" :ref='"BarLike"+index'></jiuaiCheckbox>
											<text>{{item.title}}</text> -->
											<view :style="{ border: '1px solid #d1d1d1', width: fontSize + 'px', height: fontSize + 'px', 'line-height': fontSize + 'px','border-radius':borderRadius+'px'}">
												<view :class="['jiuai-check-icon', 'iconfont', 'icon-xuanzhong', item.state ==stateindex  ? 'active' : '']"
												 :style="{ color: '#007aff', 'font-size': fontSize + 'px' }"></view>
											</view>
											<text>{{item.title}}</text>
											
										</view>
									</view>
								</view>
								<view class="cu-form-group">
									<view class="title">单据编号:</view>
									<input class="inpt" name="input" v-model="BillNo"></input>
								</view>
								<block v-if="BillType!=7&&BillType!=8&&BillType!=9&&BillType!=18">
									<view class="cu-form-group" v-if='BillType==5||BillType==6'>
										<view class="title">客户:</view>
										<view class="inpt1"><input type="text" placeholder="点击获取" :value="SelectClientObj.ClientName" disabled="true"
											 style="text-align: left;" @tap="AddClientListen()" /><button class="cu-btn  stop text-white btn_width clear"  @tap="clearFilter('gys')">清空</button></view>
									</view>
									<view class="cu-form-group" v-if='BillType!=5&&BillType!=6&&BillType!=7&&BillType!=11&&BillType!=12'>
										<view class="title">供应商:</view>
										<view class="inpt1"><input type="text" placeholder="点击获取" :value="SelectClientObj.ClientName" disabled="true"
											 style="text-align: left;" @tap="AddClientListen()" /><button class="cu-btn  stop text-white btn_width clear"  @tap="clearFilter('gys')">清空</button></view>
									</view>
									<view class="cu-form-group" v-if='BillType==7||BillType==11||BillType==12'>
										<view class="title">往来单位:</view>
										<view class="inpt1"><input type="text" placeholder="点击获取" :value="SelectClientObj.ClientName" disabled="true"
											 style="text-align: left;" @tap="AddClientListen()" /><button class="cu-btn  stop text-white btn_width clear"  @tap="clearFilter('gys')">清空</button></view>
									</view>
								</block>
								<view class="cu-form-group" v-if='BillType==18'>
									<view class="title">会员卡:</view>
									<view class="inpt1"><input type="text" placeholder="点击获取" :value="SelectClientObj.ClientName" disabled="true"
										 style="text-align: left;" @tap="AddVipListen()" /><button class="cu-btn  stop text-white btn_width clear"  @tap="clearFilter('hyk')">清空</button></view>
								</view>
								<block v-if="BillType!=18">
									<view class="cu-form-group" v-if='BillType==7'>
										<view class="title">调出仓库:</view>
										<view class="inpt1"><input type="text" placeholder="点击获取" :value="SelectOutStoreObj.StoreName" disabled="true"
											 style="text-align: left;" data-target="StoreModal" @tap="showModal" /><button class="cu-btn  stop text-white btn_width clear"  @tap="clearFilter('dcck')">清空</button>
											<view class="cu-modal" :class="modalName=='StoreModal'?'show':''">
												<view class="cu-dialog">
													<view class="cu-bar bg-white justify-end">
														<view class="content">请选择仓库</view>
														<view class="action" @tap="hideModal">
															<text class="cuIcon-close text-red"></text>
														</view>
													</view>
													<view class="padding-xl">
														<view class="searchStore">
															<input placeholder="请输入仓库名称" v-model="SearchOutStoreName" />
															<button @tap="searchOutStore">搜索</button>
														</view>
														<view class="StoreListWrap">
															<view v-for="(item,index) in StoreOutList" :key="item.StoreID" @tap="selectOutStore(index)">{{item.StoreName}}</view>
														</view>
													</view>
												</view>
											</view>
										</view>
									</view>
									<view class="cu-form-group" v-if="BillType!=7">
										<view class="title">仓库:</view>
										<view class="inpt1"><input type="text" placeholder="点击获取" :value="SelectStoreObj.StoreName" disabled="true"
											 style="text-align: left;" data-target="StoreModal" @tap="showModal" /><button class="cu-btn  stop text-white btn_width clear"  @tap="clearFilter('ck')">清空</button>
											<view class="cu-modal" :class="modalName=='StoreModal'?'show':''">
												<view class="cu-dialog">
													<view class="cu-bar bg-white justify-end">
														<view class="content">请选择仓库</view>
														<view class="action" @tap="hideModal">
															<text class="cuIcon-close text-red"></text>
														</view>
													</view>
													<view class="padding-xl">
														<view class="searchStore">
															<input placeholder="请输入仓库名称" v-model="SearchStoreName" />
															<button @tap="searchStore">搜索</button>
														</view>
														<view class="StoreListWrap">
															<view v-for="(item,index) in StoreList" :key="item.StoreID" @tap="selectStore(index)">{{item.StoreName}}</view>
														</view>
													</view>
												</view>
											</view>
										</view>
									</view>
									<view class="cu-form-group">
										<view class="title">业&nbsp;务&nbsp;员&nbsp;:</view>
										<view class="inpt1"><input type="text" placeholder="点击获取" :value="SelectOptionsObj.OperatorName" disabled="true"
											 style="text-align: left;" data-target="OptionModal" @tap="showModal" /><button class="cu-btn  stop text-white btn_width clear"  @tap="clearFilter('ywy')">清空</button>
											<view class="cu-modal" :class="modalName=='OptionModal'?'show':''">
												<view class="cu-dialog">
													<view class="cu-bar bg-white justify-end">
														<view class="content">选择业务员</view>
														<view class="action" @tap="hideModal">
															<text class="cuIcon-close text-red"></text>
														</view>
													</view>
													<view class="padding-xl">
														<view class="searchStore">
															<input placeholder="请输入业务员名称" v-model="SearchOptionName" />
															<button @tap="searchOption">搜索</button>
														</view>
														<view class="StoreListWrap">
															<view v-for="(item,index) in OperatorList" :key="item.OperatorID" @tap="selectOptions(index)">{{item.OperatorName}}</view>
														</view>
													</view>
												</view>
											</view>
										</view>
									</view>
								</block>
							</view>
							<view class="cu-form-group">
								<button class="cu-btn  stop text-white btn_width" @tap="SelBill">查询</button>
								<button class="cu-btn  stop text-white btn_width btn_color" @tap="DelectGoods">删除</button>
								<button class="cu-btn  stop text-white btn_width" @tap="electGoods">选择</button>
								<button class="cu-btn  stop text-white btn_width" @tap="selectcheck">全选</button>
							</view>
							<view class="cu-form-group">
								<button class="cu-btn  stop text-white btn_width" @tap="swits()">切换</button>
								<button class="cu-btn  stop text-white btn_width" @tap="BillCheck()">审核</button>
								<button class="cu-btn  stop text-white btn_width" @tap="BillCheckReverse()">反审核</button>
								<button class="cu-btn  stop text-white btn_width" style="visibility:hidden;">占位</button>
								<!-- elect -->
							</view>
						</view>
						<view v-if="TabCur ==1" class="cg-detail">

						</view>
					</form>
				</view>
			</view>
			<!-- 表格home -->
			<view class="orderList" :style="{height: orderListHeight + 'px'}" v-show="switrs == 1">
				<view class="orderNav" :style="{width:tdAllWidth+'px'}">		
					<text :style="{width:tdWidth[0]+'px'}">序号</text>
					<text :style="{width:tdWidth[1]+'px'}">选择</text>
					<text :style="{width:tdWidth[2]+'px'}">单号</text>
					<text :style="{width:tdWidth[3]+'px'}">日期</text>
					<!-- <text :style="{width:tdWidth[4]+'px'}">供货单位</text> -->
					<text :style="{width:tdWidth[4]+'px'}">调入仓库</text>
					<text :style="{width:tdWidth[5]+'px'}">调出仓库</text>
					<text :style="{width:tdWidth[6]+'px'}" >审核状态</text>
					<text :style="{width:tdWidth[7]+'px'}" >业务员</text>
					<text :style="{width:tdWidth[8]+'px'}" >备注</text>
				</view>
				<view class="orderLi" :style="{height:orderLiHeight +'px',width:tdAllWidth+'px'}">
					<view class="orderItem" v-for="(item,index) in tableList"  
									 :class="[{'background':!(index%2==0)}]"  :key="index" @tap="checktr(index)">
						<view :style="{width:tdWidth[0]+'px'}">{{index+1}}</view>
						<view :style="{width:tdWidth[1]+'px'}">
							<radio  :checked="item.ischeck" @tap.stop="radiocheck(index)" />
						</view>
						<view :style="{width:tdWidth[2]+'px'}" v-if="BillType==11||BillType==12||BillType==18">{{item.PayNo}}</view>
						<view :style="{width:tdWidth[2]+'px'}" v-else>{{item.BillNo}}</view>
						<view :style="{width:tdWidth[3]+'px'}" v-if="BillType==11||BillType==12||BillType==18">{{timesubstr(item.PayTime)}}</view>
						<view :style="{width:tdWidth[3]+'px'}" v-else>{{timesubstr(item.BillTime)}}</view>
						<!-- <view :style="{width:tdWidth[4]+'px'}">{{item.BName}}</view> -->
						<view :style="{width:tdWidth[4]+'px'}">{{item.stockName}}</view>
						<view :style="{width:tdWidth[5]+'px'}">{{item.stockName2}}</view>
						<view :style="{width:tdWidth[6]+'px'}">{{ item.State ==1?'已审核':'未审核' }}</view>
						<view :style="{width:tdWidth[7]+'px'}">{{item.EName}}</view>
						<view :style="{width:tdWidth[8]+'px'}">{{item.omment}}</view>
						 
					</view>
				</view>
			</view>
			<view class="box_list" style="background-color: #EEEEEE;padding: 3px 0 ;" v-show="switrs == 2">
				<view v-for="(item,index) in tableList" :key="item.id" @tap="checktr(index)" :class="['item_list',{'item_table':index == homeunfold}] "
				 v-if="item.isShow">
					<p v-if="BillType==11||BillType==12||BillType==18">单号：{{ item.PayNo }} <span style="position: absolute;right: 10px;top: 5px;">
							<radio :checked="item.ischeck" @tap.stop="radiocheck(index)" /></span></p>
					<p v-else>单号：{{ item.BillNo }} <span style="position: absolute;right: 10px;top: 5px;">
							<radio :checked="item.ischeck" @tap.stop="radiocheck(index)" /></span></p>
					<p v-if="BillType==11||BillType==12||BillType==18">日期：{{timesubstr(item.PayTime)}}</p>
					<p v-else>日期：{{timesubstr(item.BillTime)}}</p>
					<!-- <block v-if="BillType!=18">
						<p v-if="BillType==11||BillType==12">往来单位：{{ item.ClientName }}</p>
						<p v-else>供货单位：{{ item.BName }}</p>
					</block> -->
					<p>业务员：{{ item.EName }}</p>
					<p>调入仓库：{{ item.stockName }}</p>
					<p>调出仓库：{{ item.stockName2 }}</p>
					<p>审核状态：{{ item.State ==1?'已审核':'未审核' }}</p>
					<p>备注：{{ item.Comment }}</p>
					<div class="radius" @tap.stop="homeunfolds(index)">
						<div class="d3" v-if="index != homeunfold"></div>
						<div class="d4" v-else></div>
					</div>
				</view>
			</view>
			<!-- 表格end -->
		</scroll-view>

		<uni-calendar ref="calendar" :insert="false" @confirm="confirm" />
		<!-- 弹出框home -->
		<view class="layer_model" v-show="isshow">
			<view class="layer_body">
				<view class="layer_title">
					请选择{{listcode}}
					<!-- <view class="user_list">全部供应商</view> -->
				</view>
				<!-- 供应商 -->
				<view class="layer_content" v-show="listshow == 1">
					<view v-for="(item,index) in ClientList" :class="['user_list',{'user_list_success':checkedClientList.ClientCode == item.ClientCode}]"
					 @tap="checkuser(index)" :key="item.id">{{item.ClientName}}</view>
				</view>
				<!-- 仓库 -->
				<view class="layer_content" v-show="listshow == 2">
					<view v-for="(item,index) in StoreList" :class="['user_list',{'user_list_success':checkedwarehouse.StoreName == item.StoreName}]"
					 @tap="checkware(index)" :key="item.id">{{item.StoreName}}</view>
				</view>

				<!-- 业务员 -->
				<view class="layer_content" v-show="listshow == 3">
					<view v-for="(item,index) in OperatorList" :class="['user_list',{'user_list_success':checksalesman.OperatorName == item.OperatorName}]"
					 @tap="checksale(index)" :key="item.id">{{item.OperatorName}}</view>
				</view>
				<view class="btn_pointer">
					<view class="btn_close" @tap="closemodel">取消</view>
					<!-- <view class="btn_confirm">确定</view> -->
				</view>
 
			</view>
		</view>
		<!-- 弹出框end -->
		<view class="quiteTop" v-if="isShowTip" @tap="scrollTop">返回</br>顶部</view>
	</view>
</template>
<script>
	import allConst from "../../Json.js"
	import uniIcon from '@/components/uni-icon/uni-icon.vue';
	import uniCalendar from '@/components/uni-calendar/uni-calendar.vue';
	import * as Api from '@/syApis/syAddOrder/syaddApis.js';
	import * as ApiBb from '@/syApis/sygetOrder/apis.js';
	export default {
		data() {
			return {
				isShowGoodsType: 0,
				typeName: "全部分类",
				date: '',
				delbillid: [], //存放删除的id
				selectcheckall: 1, // 全选
				isshow: false, //弹出框是否显示
				checklist: -1,
				unfold: -1, // 展开
				homeunfold: -1, // 展开
				switrs: 2, //主界面风格切换
				// 选中的供应商
				checkedClientList: [],
				//选中的仓库
				checkedwarehouse: [],
				//选中的业务员
				checksalesman: [],
				listshow: -1, //弹出框显示的内容
				listcode: '', //弹出框显示的title
				timeData: {
					clockinfo: '',
					date: '',
					fulldate: '',
					lunar: '',
					month: '',
					range: '',
					year: ''
				},
				timeData1: {
					fulldate: '',
				},
				isdata: 0, //判断是开始日期还是结束日期
				munelist: [{
					title: '单据信息',
				}, {
					title: '商品明细'
				}],
				TabCur: 0,
				scrollLeft: 0,
				index: 0,
				index1: 0,
				index2: 0,
				picker: ['批发客户', '零售客户', '批发价1客户'],
				picker1: ['张三', '李四', '王五'],
				picker2: [],
				list: [{
					index: 0,
					name: "单据信息"
				}],
				modalName: '',
				unitslist: [{
					unit: "件"
				}, {
					unit: "箱"
				}],
				unitselected: '',
				BillNo: "",
				//单据类型
				BillType: 1,
				IsAdd: 0,
				BillDate: "",
				//订单商品
				OrderGoodsList: [],
				//当前选择的商品
				NowSelectGoods: {},
				//商品数量
				GoodsQty: "",
				//商品折扣
				GoodsDiscount: "",
				//商品备注
				GoodsRemark: "",
				//商品库存
				GoodsStorm: "",
				//仓库的列表
				StoreList: [],
				//业务员的列表
				OperatorList: [],
				//供应商的列表
				ClientList: [],
				//制单人
				CreateName: uni.getStorageSync("UserName"),
				//税率
				Tax: "",
				//商品列表查看更多标识
				selectLookMore: -1,
				tableList: [],
				//当前选择的调入仓库
				SelectStoreObj: {
					StroeID: "",
					StoreName: ""
				},
				//调入仓库搜索
				SearchStoreName: "",
				//调出仓库
				StoreOutList: [],
				//当前选择的调出仓库
				SelectOutStoreObj: {
					StroeID: "",
					StoreName: ""
				},
				//调入仓库搜索
				SearchOutStoreName: "",
				//当前选择的供应商或者客户条目
				SelectClientObj: {
					ClientName: "",
					CreateID: ""
				},
				//当前选择的业务员条目
				SelectOptionsObj: {
					OperatorName: "",
					OperatorID: ""
				},
				//业务员搜索
				SearchOptionName: "",
				//Vip卡
				SelectVipObj: {
					MemberCode: "",
					MemberID: ""
				},
				//当前选择的修改条目
				NowOrder: {},
				//已审核的单数
				isBillCheck: 0,
				//已成功审核单的索引
				isBillCheckSuc: [],
				//反审核的单数
				isReverseBillCheck: 0,
				//已成功反审核的索引
				isReverseBillCheckSuc: [],
				//调入仓库临时数组
				TempInStoreList: [],
				//调出仓库临时数组
				TempOutStoreList: [],
				isShowTip:false,
				orderListHeight: 300,
				orderLiHeight: 260,
				orderList: [],
				tdWidth: [50, 60, 125, 125, 125, 125, 80,125,125],
				shStateList:[{
					title:"未审",
					state:0
				},{
					title:"已审",
					state:1
				},{
					title:"全部",
					state:2
				}],
				stateindex:0,
				fontSize:uni.upx2px(44),
				borderRadius:uni.upx2px(6),
				isBillCheckQx:false

			}
		},
		components: {
			uniCalendar,
			uniIcon,
		},
		computed: {
			tdAllWidth() {
				var tdAllWidth = 0;
				this.tdWidth.forEach(item => {
					tdAllWidth += parseFloat(item);
				});
				tdAllWidth += this.tdWidth.length - 1;
				return tdAllWidth;
			}
		},
		//页面加载完成获取高度
		onReady(){
			var that = this
			uni.getSystemInfo({
			　　success: function(res) { // res - 各种参数
			　	let main = uni.createSelectorQuery().select(".cg-main");
			　　　  　main.boundingClientRect(function(data) { //data - 各种参数
			// 　　　  　console.log("元素的高度"+data.height)  // 获取元素宽度
			        console.log(data)
					 // 剩余的高度
					 // orderListHeight: 300,
					 // orderLiHeight: 260,
					 that.orderListHeight = res.windowHeight - data.height + 300;
					 that.orderLiHeight = (res.windowHeight - data.height) - 40 + 300;
					 // that.orderListHeight = res.windowHeight - (6*37);
					 // that.orderLiHeight = (res.windowHeight - (6*37)) - 40;
					 console.log('剩余的高度')
					 console.log(that.orderListHeight)
					 console.log('表格内容的高度')
					 console.log(that.orderLiHeight)
					 // 表格内容的高度
					 console.log((res.windowHeight - data.height) - 40)
			　　    }).exec()
			       }
			});
		},
		onPageScroll(e) {
			if (e.scrollTop > 400) {
				this.isShowTip = true;
			} else {
				this.isShowTip = false;
			}
		},
		onLoad(options) {
			setTimeout(() => {
				this.showCalendar = true
			}, 350);
			this.BillName = options.BillName;
			this.BillType = options.BillType;
			uni.setNavigationBarTitle({
				title: this.BillName
			})
			this.pullBillType(this.BillName);
			this.getClientList();
			this.GetOperatorMessage();
			this.GetStoreMessage(2);
			let PDA_Module_Android = uni.getStorageSync("PDA_Module_Android"); //获取单据权限
			PDA_Module_Android = JSON.parse(PDA_Module_Android);
			var that = this;
			PDA_Module_Android.forEach((item, index) => {
				if (this.BillName == item.ModuleName) {
					that.isUserRoot = item;
				}
			});
			let  SystemSettingInfo  = uni.getStorageSync("SystemSettingInfo", ""); //存储系统设置
			SystemSettingInfo = JSON.parse(SystemSettingInfo);
			SystemSettingInfo.forEach((item,index)=>{
				 if(item.SystemName == '单据是否直接审核'){
					 if(item.Value == "1"){
						 that.isBillCheckQx = true;
					 }
					 // console.log(item.Value);
				 }
				 
			});
		},
		created() {
			let date = new Date();
			var month = date.getMonth() + 1;
			if(month < 10 ){
			     month = "0" + month
			}
			var day = date.getDate();
			if(day<10){
				day = "0"+day;
			}
			this.timeData.fulldate = date.getFullYear() + "-" + month + "-" + day;
			this.timeData1.fulldate = date.getFullYear() + "-" + month + "-" + day;
			//初始化默认赋值今天日期
			// this.timeData.fulldate = this.BillDate;
			// this.timeData1.fulldate = this.BillDate;
		},
		methods: {
			clearFilter(key){
				if(key=="gys"){
					this.SelectClientObj = {
						ClientID:"",
						ClientName:""
					}
					// .ClientID = "";
					// this.SelectClientObj.ClientName = "";
				}else if(key=="ywy"){
					this.SelectOptionsObj = {
						OperatorID:"",
						OperatorName:""
					}
					// .OperatorID:"",
					//  = "";
					// this.SelectOptionsObj.OperatorName = "";
				}else if(key=="dcck"){
					this.SelectOutStoreObj = {
						StoreID:"",
						StoreName:""
					}
					// .StoreID = "";
					// this.SelectOutStoreObj.StoreName = "";
				}else if(key=="hyk"){
					this.SelectVipObj = {
						MemberCode:"",
						MemberID:""
					}
					// .MemberCode = "";
					// this.SelectVipObj.MemberID = "";
				}else if(key=="ck"){
					this.SelectStoreObj = {
						StoreID:"",
						StoreName:""
					}
					// .StoreID = "";
					// this.SelectStoreObj.StoreName = "";
				}
			},
			// 选中审核状态
			clickcheckd:function(index){
				console.log(index)
				this.stateindex = index
			},
			DateChangeStart(e){
				this.timeData.fulldate = e.detail.value;
				console.log(e);
			},
			DateChangeEnd(e){
				this.timeData1.fulldate = e.detail.value;
				console.log(e);
			},
			//返回顶部
			scrollTop() {
				uni.pageScrollTo({
					scrollTop: 0,
					duration:0
				});
			},
			//审核单据
			BillCheck() {
				if (this.isUserRoot.IsBill_Check == "" && !this.isBillCheckQx) {
					Api.showTip("无审核权限");
					return;
				}
				var that = this;
				var checkCountList = [];
				this.isBillCheckSuc = [];
				this.isBillCheck = 0;
				//选择的第一个
				var checkIndex = 0;
				for (let i in this.tableList) {
					if (this.tableList[i]["ischeck"] == true) {
						checkCountList[checkIndex] = i;
						checkIndex++;
					}
				}
				if (checkCountList.length == 0) {
					Api.showTip("您还未选择任何单据");
					return;
				}
				that.toBillCheck(checkCountList, 0, checkCountList.length);
			},
			toBillCheck(checkCountList, index, countSize) {
				if (index == countSize) {
					var tip = "已成功审核" + this.isBillCheck + "张单";
					var fail = countSize - this.isBillCheck;
					if (fail != 0) {
						tip += "有" + fail + "张审核失败,原因,单据已审核";
					}
					Api.showTip(tip);
					this.removeBillCheck();
					return;
				}
				var that = this;
				let data = {
					BillType: this.BillType,
					BillID: this.tableList[checkCountList[index]].BillID,
					BillName: this.BillName
				};
				Api.Bill_Check(data, function(res) {
					index++;

					if (res.state) {
						if (res.data.ErrorMsg == '获取登录信息失败') {

						} else if (res.data.ErrorMsg != "") {
							//Api.showTip(res.data.ErrorMsg);
						} else {
							that.isBillCheckSuc[that.isBillCheck] = checkCountList[that.isBillCheck];
							that.isBillCheck++;
							Api.showTip(res.data.ResultMsg);
						}
					} else {

					}
					that.toBillCheck(checkCountList, index, countSize);

				})
			},
			//移除已审核单据
			removeBillCheck() {
				var that = this;
				this.isBillCheckSuc.forEach($item => {
					this.tableList.forEach((item, index) => {
						if (index == $item) {
							that.tableList[index].isShow = false;
							that.tableList[index].ischeck = false;
							return;
						}
					})
				});

			},
			//反审核单据
			BillCheckReverse() {
				if (this.isUserRoot.IsBill_Check == ""&& !this.isBillCheckQx) {
					Api.showTip("无审核权限");
					return;
				}
				var that = this;
				var checkCountList = [];
				this.isReverseBillCheckSuc = [];
				this.isReverseBillCheck = 0;
				//选择的第一个
				var checkIndex = 0;
				for (let i in this.tableList) {
					if (this.tableList[i]["ischeck"] == true) {
						checkCountList[checkIndex] = i;
						checkIndex++;
					}
				}
				if (checkCountList.length == 0) {
					Api.showTip("您还未选择任何单据");
					return;
				}
				that.toBillCheckReverse(checkCountList, 0, checkCountList.length);
			},
			//移除已审核单据
			removeBillCheckReverse() {
				var that = this;
				console.log("====");

				this.isReverseBillCheckSuc.forEach($item => {
					this.tableList.forEach((item, index) => {
						console.log(index, $item);
						if (index == $item) {
							that.tableList[index].isShow = false;
							that.tableList[index].ischeck = false;
							return;
						}
					})
				});

			},
			toBillCheckReverse(checkCountList, index, countSize) {
				if (index == countSize) {

					var tip = "已成功反审核" + this.isReverseBillCheck + "张单";
					var fail = countSize - this.isReverseBillCheck;
					if (fail > 0) {
						tip += "有" + fail + "张审核失败,原因,单据未审核或被引用";
					}
					Api.showTip(tip);
					this.removeBillCheckReverse();
					return;
				}
				let data = {
					BillType: this.BillType,
					BillID: this.tableList[checkCountList[index]].BillID,
					BillName: this.BillName
				};
				var that = this;
				Api.Bill_Check_Reverse(data, function(res) {
					index++;

					if (res.state) {
						if (res.data.ErrorMsg == '获取登录信息失败') {

						} else if (res.data.ErrorMsg != "") {
							//	Api.showTip(res.data.ErrorMsg);
						} else {
							that.isReverseBillCheckSuc[that.isReverseBillCheck] = checkCountList[that.isReverseBillCheck];
							that.isReverseBillCheck++;
						}
					} else {

					}
					that.toBillCheckReverse(checkCountList, index, countSize);
				})
			},
			//修改单据
			change() {
				let BillName = this.BillName;
				if (this.BillType == '7') {
					uni.redirectTo({
						url: "../add-order-allot/add-cgorder-allot?BillName=" + BillName + "&oldOrder=" + JSON.stringify(this.NowOrder) +
							"&type=1"
					})
				} else if (this.BillType == 11 || this.BillType == 12 || this.BillType == 18) {
					uni.redirectTo({
						url: "../add-order-gathering/add-order-gathering?BillName=" + BillName + "&oldOrder=" + JSON.stringify(this.NowOrder) +
							"&type=1"
					})
				} else {
					uni.redirectTo({
						url: "../add-order-rk-ck/add-cgorder-rk-ck?BillName=" + BillName + "&oldOrder=" + JSON.stringify(this.NowOrder) +
							"&type=1"
					})
				}
				// this.$eventHub.$emit('AddChangeBill', JSON.stringify(this.NowOrder));
				// uni.navigateBack({
				// 	delta: 1
				// })
			},
			//选择会员卡
			AddVipListen() {
				uni.navigateTo({
					url: '../VipMemberSelect/VipMemberSelect'
				})
				var that = this;
				this.$eventHub.$on('VipListen', function(data) {
					that.SelectVipObj = JSON.parse(data);
					that.$eventHub.$off('VipListen');
				})
			},
			//业务员点击
			selectOptions(index) {
				this.SelectOptionsObj = this.OperatorList[index];
				this.modalName = null;
			},
			//业务员搜索
			searchOption() {
				if (this.SearchOptionName != '') {
					let Filter = "EName= like '%" + this.SearchOptionName + "%'";
					this.GetOperatorMessage(Filter);
				} else {
					this.GetOperatorMessage();
				}
			},
			electGoods() {
				if (this.isUserRoot.IsBill_Change == "") {
					Api.showTip("无修改权限");
					return;
				}
				var that = this;
				var checkCount = 0;
				//选择的第一个
				var checkIndex = 0;
				for (let i in this.tableList) {
					if (this.tableList[i]["ischeck"] == true) {
						checkCount++;
						if (checkCount == 1) {
							checkIndex = i;
						}
					}
				}
				if (checkCount > 0) {
					var tip = "多选状态下,只会选择第一个选中的进行修改"
					Api.showConfirm(tip, function(state) {
						if (state) {
							that.NowOrder = that.tableList[checkIndex];
							that.change();
						} else {

						}
					})
				}
			},
			//选择供应商
			AddClientListen() {
				let isClient = "";
				if (this.BillType == 2 || this.BillType == 3) {
					isClient = 1;
				} else if (this.BillType == 5 || this.BillType == 6) {
					isClient = 0;
				} else {
					isClient = 2;
				}
				uni.navigateTo({
					url: '../clientSelect/clientSelect?isClient=' + isClient + ""
				})
				var that = this;
				this.$eventHub.$on('clientListen', function(data) {
					that.SelectClientObj = JSON.parse(data);
					that.$eventHub.$off('clientListen');
				})
			},
			//仓库点击
			selectStore(index) {
				this.SelectStoreObj = this.StoreList[index];
				this.modalName = null;
			},
			//调出仓库点击
			selectOutStore(index) {
				this.SelectOutStoreObj = this.StoreOutList[index];
				this.modalName = null;
			},
			//调入仓库点击
			selectInStore(index) {
				this.SelectInStoreObj = this.StoreInList[index];
				this.modalName = null;
			},
			//搜索仓库
			searchStore() {
				if (this.SearchStoreName != '') {
					let Filter = "StoreName like '%" + this.SearchStoreName + "%'";
					this.GetStoreMessage(Filter, 2);
				} else {
					this.GetStoreMessage(2);
				}
			},
			//跳转到明细
			checktr: function(e) {
				let Detailid = "";
				let BillNo = "";
				if (this.BillType == 11 || this.BillType == 12 || this.BillType == 18) {
					Detailid = this.tableList[e]['PayID'];
					BillNo = this.tableList[e]['PayNo'];
				} else {
					Detailid = this.tableList[e]['BillID'];
					BillNo = this.tableList[e]['BillNo'];
				}
				uni.navigateTo({
					url: '../selPurchaseMoreStore/selectdetail/selectdetail?id=' + Detailid + '&BillNo=' + BillNo + "&BillType=" +
						this.BillType
				});
			},
			//多选
			radiocheck: function(evt) {
				// this.ischeck = evt
				this.tableList[evt]["ischeck"] = this.tableList[evt]["ischeck"] == true ? false : true
				// console.log(this.tableList)
				// console.log(evt)
				//如果全部选中了，改变全选
				for (let j in this.tableList) {
					if (this.tableList[j]["ischeck"] != false) {
						this.selectcheckall = 2
					} else {
						this.selectcheckall = 1
					}
				}
			},
			//赋值单据类型
			pullBillType(str) {
				switch (str) {
					case '采购入库单':
						this.BillType = 2;
						break;
					case '调拨单':
						this.BillType = 7;
						break;
					case '销售出库单':
						this.BillType = 5;
						break;
					case '采购退货单':
						this.BillType = 3;
						break;
					case '销售退货单':
						this.BillType = 6;
						break;
					case '其他入库单':
						this.BillType = 8;
						break;
					case '其他出库单':
						this.BillType = 9;
						break;
					case '收款单':
						this.BillType = 11;
						break;
					case '付款单':
						this.BillType = 12;
						break;
					case '会员充值':
						this.BillType = 18;
						break;
					default:
						break;
				}
			},
			//是否展开
			homeunfolds: function(e) {
				if (this.homeunfold == e) {
					this.homeunfold = -1
				} else {
					this.homeunfold = e
				}
			},
			//全选
			selectcheck: function() {
				// selectcheckall
				for (let j in this.tableList) {
					this.tableList[j]["ischeck"] = this.selectcheckall == 1 ? true : false
				}
				this.selectcheckall = this.selectcheckall == 1 ? 2 : 1
			},
			// 删除
			DelectGoods: function() {
				// 找出选中删除的id
				var delid = null;
				for (let i in this.tableList) {
					console.log(i)
					console.log(this.tableList[i]["ischeck"])

					if (this.tableList[i]["ischeck"] == true) {
						this.delbillid.push(this.tableList[i]["BillID"])
						// delid+=this.tableList[i]["BillID"]+','
					}
				}
				var that = this;
				that.tableList = [] //先清空原来的数据
				let ClientID = uni.getStorageSync("UserCode");
				let CreateName = uni.getStorageSync("UserName");
				let data = {
					BillType: this.BillType,
					Database: 'FastApp',
					BillID: this.delbillid.join(','),
				};
				ApiBb.Delete_Bill(data, function(res) {
					if (res.state) {
						console.log(res)
						if (res.data.ErrorMsg == "获取登录信息失败") {
							ApiBb.showTip("登录超时");
						} else if (res.data.ErrorMsg != "") {
							ApiBb.showTip(res.data.ErrorMsg);
						} else {
							ApiBb.showTip(res.data.TipsMsg);
						}
					} else {
						ApiBb.showTip("服务器错误!");
					}
				});
			},
			back: function() {
				this.Detail = false
			},
			// 选中的供应商
			checkuser: function(e) {
				this.checkedClientList = this.ClientList[e]
				// this.checklist = e
				this.isshow = false
				console.log('打印的参数')
				console.log(this.checkedClientList)
			},
			// 选中的仓库
			checkware: function(e) {
				this.checkedwarehouse = this.StoreList[e]
				// this.checklist = e
				this.isshow = false
				console.log('打印的参数')
				console.log(this.checkedwarehouse)
			},
			// 选中的业务员
			checksale: function(e) {
				this.checksalesman = this.OperatorList[e]
				// this.checklist = e
				this.isshow = false
				console.log('打印的参数')
				console.log(this.checksalesman)
			},


			//取消
			closemodel: function() {
				this.isshow = false
			},
			//获取更多商品信息
			lookGoodsInfo(index) {
				if (this.selectLookMore == index) {
					this.selectLookMore = -1;
				} else {
					this.selectLookMore = index;
				}
			},
			//选择供应商
			supplier: function() {
				this.isshow = true;
				this.listshow = 1
				this.listcode = '供应商'
			},
			//选择仓库
			warehouse: function() {
				this.isshow = true
				this.listshow = 2
				this.listcode = '仓库'
			},
			//选择业务员
			salesman: function() {
				this.isshow = true
				this.listshow = 3
				this.listcode = '业务员'
			},


			//获取供应商列表
			getClientList() {
				let data = {};
				if (this.BillType != 5 && this.BillType != 6) {
					data = {
						Filter: "IsClient<>1"
					}
				} else {
					data = {
						Filter: "IsClient<>0"
					}
				}
				this.picker = [];
				var that = this;
				Api.GetClientPurMessage(data, function(res) {
					console.log(res)
					if (res.state) {
						if (res.data.ErrorMsg == "获取登录信息失败") {
							Api.showTip("登录超时");
						} else if (res.data.ErrorMsg != "") {
							Api.showTip(res.data.ErrorMsg);
						} else {
							let responseData = res.data.ResultMsg;
							that.ClientList = responseData;
						}
					} else {

					}
				});
			},
			//获取业务员列表
			GetOperatorMessage(Filter = '') {
				let data = {
					Filter: Filter
				}

				var that = this;
				Api.GetOperatorMessage(data, function(res) {
					if (res.state) {
						if (res.data.ErrorMsg == "获取登录信息失败") {
							Api.showTip("登录超时");
						} else if (res.data.ErrorMsg != "") {
							Api.showTip(res.data.ErrorMsg);
						} else {
							that.OperatorList = res.data.ResultMsg;

						}
					} else {

					}
				});
			},
			SelectStockNum(GoodsID) {
				if (this.StoreList.length == 0) {
					uni.showToast({
						title: "请先选择仓库"
					});
					return;
				};

				let StroeID = this.StoreList[this.index2].StoreID;
				let data = {
					StoreID: StroeID,
					GoodsID: GoodsID,
					BillName: this.BillName
				};
				var _this = this;
				Api.SelectStockNum(data, (res) => {
					if (res.data.ErrorMsg == "获取登录信息失败") {

					} else if (res.data.ErrorMsg != "") {
						Api.showTip(res.data.ErrorMsg);
					} else {
						_this.GoodsStorm = res.data.ResultMsg;
					}
				});
			},

			AddListen() {
				var _this = this;
				this.$eventHub.$on('fire', function(data) {
					let GoodsItem = JSON.parse(data);
					_this.NowSelectGoods = GoodsItem;
					_this.SelectStockNum(GoodsItem.GoodsID)
					_this.$eventHub.$off('fire');
				});
			},
			/* 获取仓库  */
			GetStoreMessage(SearcgType, Filter = '') {
				var that = this;
				let data = {
					Filter: Filter
				}
				Api.GetStoreMessage(data, function(res) {
					if (res.state) {
						if (res.data.ErrorMsg == "获取登录信息失败") {
							Api.showTip("登录超时");
						} else if (res.data.ErrorMsg != "") {
							Api.showTip(res.data.ErrorMsg);
						} else {
							if (SearcgType == 2) {
								that.StoreList = res.data.ResultMsg;
								that.StoreInList = res.data.ResultMsg;
								that.StoreOutList = res.data.ResultMsg;
							} else if (SearcgType == 0) {
								that.StoreInList = res.data.ResultMsg;
							} else {
								that.StoreOutList = res.data.ResultMsg;
							}

						}
					} else {

					}
				});
			},
			searchOutStore() {

			},
			tabSelect(e) {
				this.TabCur = e.currentTarget.dataset.id;
				console.log(22)
				this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60
			},
			PickerChange(e) {
				console.log(e)
				this.index = e.detail.value
			},
			PickerChange1(e) {
				console.log(e)
				this.index1 = e.detail.value
			},
			PickerChange2(e) {
				console.log(e)
				this.index2 = e.detail.value
			},
			xiala(e) {
				var i = e.currentTarget.dataset.findex;
				console.log(i)

			},
			open(e) {
				console.log(e)
				var nums = e
				this.isdata = e; //赋值给isdata用于判断是开始日期还是结束日期
				this.$refs.calendar.open();
			},
			confirm(e) {
				// var fulldate = e.detail.fulldate
				// console.log(e.detail.fulldate);
				// console.log('这是一个打印')
				// console.log(this.isdata)
				// 1是开始日期 2是结束日期
				if (this.isdata == 1) {
					console.log(e)
					this.timeData = e
				} else if (this.isdata == 2) {
					this.timeData1.fulldate = e.fulldate
				}
			},
			gogoodlist() {
				this.AddListen();
				uni.navigateTo({
					url: "../goodList/goodList?type=1"
				})
			},
			//显示全部分类
			showType: function() {
				if (this.isShowGoodsType == 0) {
					this.isShowGoodsType = 1;
				} else {
					this.isShowGoodsType = 0;
				}

			},
			showModal(e) {
				console.log(1111)
				this.modalName = e.currentTarget.dataset.target
			},
			hideModal(e) {
				console.log(222)
				this.modalName = null
			},
			choosesunit(e) {
				console.log(e)
				var unit = e.currentTarget.dataset.unit
				this.unitselected = unit
				this.modalName = null
			},
			//查询
			SelBill() {
				console.log('单据编号')
				console.log(this.BillNo)
				if (this.timeData.fulldate == "" || this.timeData.fulldate == undefined) {
					ApiBb.showTip("单据时间不能为空")
				} else if (this.timeData1.fulldate == "" || this.timeData1.fulldate == undefined) {
					ApiBb.showTip("结束时间不能为空")
				} else {
					var that = this;
					that.tableList = [] //先清空原来的数据
					let ClientID = uni.getStorageSync("UserCode");
					let CreateName = uni.getStorageSync("UserName");
					let isnullBillNo = this.BillNo == "" ? '' : ' and ' + "BillNo='" + this.BillNo + "'"; //如果为空则不传
					let isnullClientID = this.picker[this.index] == "" ? '' : ' and ' + "ClientID='" + this.picker[this.index] + "'";
					let isnullEmpID = this.picker1[this.index1] == "" ? '' : ' and ' + "EmpID='" + this.picker1[this.index1] + "'";
					let isnullStoreID = this.picker2[this.index2] == "" ? '' : ' and ' + "StoreID='" + this.picker2[this.index2] + "'";
					let filter = "";
					if (this.BillType == 11 || this.BillType == 12 || this.BillType == 18) {
						filter = "[PayTime]>='" + that.timeData.fulldate + "'●and●[PayTime]<='" + that.timeData1.fulldate + "'";
					} else {
						filter = "[BillTime]>='" + that.timeData.fulldate + "'●and●[BillTime]<='" + that.timeData1.fulldate + "'";
					}
					// var filter = "[BillTime]>='" + that.timeData.fulldate + "'●and●[BillTime]<='" + that.timeData1.fulldate + "'";
					if (this.SelectStoreObj.StoreName != undefined && this.SelectStoreObj.StoreName != '') {
						filter += "●and●[StoreID]='" + this.SelectStoreObj.StoreID + "'";
					}if (this.SelectOutStoreObj.StoreName != undefined && this.SelectOutStoreObj.StoreName != '') {
						filter += "●and●[StoreID2]='" + this.SelectOutStoreObj.StoreID + "'";
					}
					if (this.SelectClientObj.ClientName != undefined && this.SelectClientObj.ClientName != '') {
						filter += "●and●[ClientID]='" + this.SelectClientObj.ClientID + "'";
					}
					if (this.SelectOptionsObj.OperatorName != undefined && this.SelectOptionsObj.OperatorName != '') {
						filter += "●and●[EmpID]='" + this.SelectOptionsObj.OperatorID + "'";
					}
					if (this.BillNo != '' && this.BillNo != undefined) {
						filter += "●and●[BillNo] like '%" + this.BillNo + "%'";
					}
					if(this.stateindex != 2){
						filter += "●and●[state]='" + this.stateindex + "'";
					}
					let data = {
						BillType: this.BillType,
						Filter: filter
					};
					if (this.BillType == 11 || this.BillType == 12 || this.BillType == 18) {
						ApiBb.SelectBillPay(data, function(res) {
							if (res.state) {
								if (res.data.ErrorMsg == "获取登录信息失败") {
									ApiBb.showTip("登录超时");
								} else if (res.data.ErrorMsg != "") {
									ApiBb.showTip(res.data.ErrorMsg);
								} else if (res.data.TipsMsg == "OK" && res.data.ResultMsg == "") {
									ApiBb.showTip("查无数据");

								} else {
									console.log(res.data.ResultMsg);
									// that.tableList = res.data.ResultMsg
									res.data.ResultMsg.forEach((item, index) => {
										res.data.ResultMsg[index].UpdateTime = "";
										res.data.ResultMsg[index]["ischeck"] = false; //赋值默认不选中
										res.data.ResultMsg[index]["isShow"] = true; //赋值默认不选中
									});
									that.tableList = res.data.ResultMsg
								}
							} else {
								ApiBb.showTip("服务器错误!");
							}
						});
					} else {
						ApiBb.SelectBillMaster(data, function(res) {
							if (res.state) {
								if (res.data.ErrorMsg == "获取登录信息失败") {
									ApiBb.showTip("登录超时");
								} else if (res.data.ErrorMsg != "") {
									ApiBb.showTip(res.data.ErrorMsg);
								} else if (res.data.TipsMsg == "OK" && res.data.ResultMsg == "") {
									ApiBb.showTip("查无数据");

								} else {
									console.log(res.data.ResultMsg);
									// that.tableList = res.data.ResultMsg
									res.data.ResultMsg.forEach((item, index) => {
										res.data.ResultMsg[index].UpdateTime = "";
										res.data.ResultMsg[index]["ischeck"] = false; //赋值默认不选中
										res.data.ResultMsg[index]["isShow"] = true; //赋值默认不选中
									});
									that.tableList = res.data.ResultMsg
								}
							} else {
								ApiBb.showTip("服务器错误!");
							}
						});
					}

				}
			},
			// 主界面切换
			swits: function() {
				this.switrs = this.switrs == 1 ? 2 : 1
			},
			//是否全选  点击后改变状态
			ischecka: function() {
				if (this.ischeckall == false) {
					this.ischeckall = true
				} else {
					this.ischeckall = false
				}

			},
			// 日期截取
			timesubstr: function(e) {
				if(e=="" || typeof e == 'undefined'){
					return "";
				}
				return e.substring(0, 10)
			},
			//保留两位小数
			toFix: function(evt) {
				if (evt == "" || evt == undefined) {
					return evt
				}
				evt = parseFloat(evt);
				return evt.toFixed(2) //此处2为保留两位小数
			}
		}

	}
</script>

<style lang="scss">
	@import url("./selPurchase.css");

	page {
		background-color: #EEEEEE;
		padding-bottom: 0upx;
		height: 100%;
	}

	.header {
		position: fixed;
		z-index: 100;
		width: 100%;
		background: #fff;
		height: 45px;
	}

	.stop {
		background-color: rgb(96, 188, 204);
	}

	.text-color {
		color: rgba(124, 170, 216, 1);
	}

	.f-size {
		font-size: 16px;
	}

	.main {
		/* padding-top: 55px; */
		background: #EEEEEE;
	}

	.inpt1 {
		width: 100%;
		text-align: left;
		align-items: center;
		display: flex;
	}

	/* .detail-box {
		padding-top: 40px;
	} */

	view {
		font-size: 28upx;
		line-height: inherit
	}

	.example {
		padding: 0 30upx 30upx
	}

	.example-title {
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-size: 32upx;
		color: #464e52;
		padding: 30upx 30upx 30upx 50upx;
		margin-top: 20upx;
		position: relative;
		background-color: #fdfdfd;
		border-bottom: 1px #f5f5f5 solid
	}

	.example-title__after {
		position: relative;
		color: #031e3c
	}

	.example-title:after {
		content: '';
		position: absolute;
		left: 30upx;
		margin: auto;
		top: 0;
		bottom: 0;
		width: 6upx;
		height: 32upx;
		background-color: #ccc
	}

	.example .example-title {
		margin: 40upx 0
	}

	.example-body {
		padding: 30upx;
		background: #fff
	}

	.example-info {
		padding: 30upx;
		color: #3b4144;
		background: #fff
	}

	.calendar-content {
		padding-bottom: 100upx;
		font-size: 26upx;
	}

	.calendar-content-active {
		padding-bottom: 450upx;
	}

	.calendar-tags-group {
		display: flex;
		flex-direction: column;
		flex-wrap: wrap;
		justify-content: space-between;
	}

	.calendar-tags {
		width: 100%;
		box-sizing: border-box;
	}

	.calendar-tags-item {
		padding: 20upx 20upx;
		border: 1px rgba(0, 0, 0, 0.2) solid;
		color: #333;
		border-radius: 10upx;
		text-align: center;
		margin: 10upx;
		background: #f8f8f8;
	}

	.calendar-tags-item:active {
		background: #f8f8f8;
	}

	.checked .calendar-tags-item {
		background: rgb(0, 122, 255);
		color: #fff;
		border: 1px rgba(0, 0, 0, 0.1) solid;
	}

	.calendar-button {
		font-weight: bold;
		font-size: 32upx;
	}

	.calendar-button-groups {
		position: absolute;
		width: 100%;
		bottom: 0;
		display: flex;
	}

	.calendar-button-confirm {
		width: 50%;
		margin: 10upx;
		border: 1px #eee solid;
		font-size: 32upx;
	}

	.calendar-button-confirm:after {
		border: none;
	}

	.calendar-box {
		position: fixed;
		bottom: 0;
		background: #fff;
		color: #444;
		line-height: 1.5;
		width: 100%;
		transition: all 0.3s;
		transform: translateY(320upx);
		/* background: #f5f5f5; */
	}

	.calendar-active {
		transform: translateY(0);
	}

	.calendar-info-header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 20upx 30upx;
		padding-left: 0;
		border-top: 1px #eee solid;
		border-bottom: 1px #eee solid;
	}

	.calendar-title {
		/* height: 80upx; */
		font-weight: bold;
		color: #666;
		font-size: 32upx;
		border-left: 2px #0d9ebb solid;
		padding-left: 20upx;
		margin: 0 20upx;
	}

	.calendar-info {
		overflow-y: scroll;
		height: 260upx;
		padding: 30upx 30upx;
	}

	/*搜索*/
	/* .goodContainer{
		flex: 1;
		margin-top: 60px;
		padding-bottom: 55px;
	} */
	.searchInput {
		width: 100%;
		height: 40px;
		line-height: 40px;
		background: #FFF;
		display: flex;
		flex-direction: row;

		background: #FFF;
		z-index: 999;
	}

	.searchInput .goodType {
		background: #f1f2f7;
		border-radius: 20px;
		height: 28px;
		line-height: 28px;
		color: #9699a2;
		padding-left: 10px;
		padding-right: 10px;
		font-size: 12px;
		margin-top: 6px;
		margin-left: 10px;
	}

	.searchInput .goodFilter {
		flex: 1;
		display: flex;
		background: #eff2fb;
		border-radius: 20px;
		height: 30px;
		line-height: 30px;
		margin-top: 6px;
		box-sizing: border-box;
		margin-left: 10px;
		margin-right: 5px;
	}

	.searchInput .goodFilter .searchOption {
		flex: 1;
		height: 28px;
		line-height: 28px;
		font-size: 28upx;
		color: #9699a2;
	}

	.searchInput .searchOptions {
		width: 70px;
		height: 40px;
		display: flex;
		flex-direction: row;
		padding-top: 7.5px;
	}

	.searchInput .searchOptions .giveSong {
		width: 25px;
		height: 25px;
		/* background: url(../../static/addGoods.png) no-repeat; */
		padding: 0px;
	}

	.searchInput .searchOptions .getPicture {
		width: 25px;
		height: 25px;
		background: url(../../static/sm.png) no-repeat;
		padding: 0px;
	}

	.allGoodsType {
		width: 100%;
		height: calc(100% - 50px);
		background: #FFF;
		position: fixed;
		top: 90px;
		left: 0px;
		z-index: 99999;
	}

	.allGoodsType .typeTitle {
		width: 100%;
		height: 40px;
		line-height: 40px;
		color: #000;
		padding-left: 15px;
		border-bottom: 1px solid #ebebeb;
		box-sizing: border-box;
		padding-right: 15px;
		font-size: 32upx;
	}

	.allGoodsType .typeTitle .pulljt {
		display: inline-block;
		float: right;
		transform: rotate(90deg);
		-ms-transform: rotate(90deg);
		/* IE 9 */
		-moz-transform: rotate(90deg);
		/* Firefox */
		-webkit-transform: rotate(90deg);
		/* Safari 和 Chrome */
		-o-transform: rotate(90deg);
	}

	.allGoodsType .typeItem {
		display: block;
		width: 100%;
		height: 40px;
		line-height: 40px;
		border-bottom: 1px solid #ebebeb;
		margin-left: 15px;
		padding-left: 5px;
		font-size: 28upx;

	}


	/*这个定义动画情况，以及存在时的样式，这个样式会覆盖class里的样式*/
	.mytran-transition {
		transition: all 0.3s ease;
		opacity: 1;
	}

	/* .mytran-enter 定义进入的开始状态 */
	/* .mytran-leave 定义离开的结束状态 */
	.mytran-enter,
	.mytran-leave {
		height: 0;
	}

	/*弹窗*/
	.ls-box {
		font-size: 16px;
		padding: 5px 0;
		border-bottom: 1rpx #E1D7F0 solid;
		color: #24292E;
	}

	.bg-ls {
		background-color: rgba(33, 167, 191, 1);
		position: fixed;
		width: inherit;
		height: 50px;
		z-index: 100;
	}

	.ls-main {
		max-height: 70%;
	}

	.ls-contain {
		padding-top: 50px;
		height: inherit;
	}


	/**选取的商品列表**/
	.selectGoodsList {
		width: 100%;
		display: table;
		padding-top: 20upx;
		padding-bottom: 20upx;
	}

	.selectGoodsList .goodListItem {
		width: 90%;
		border-radius: 15upx;
		margin: auto;
		overflow: hidden;
		background: #FFF;
		padding-bottom: 15upx;
		margin-bottom: 15upx;
		height: 38px;
	}

	.selectGoodsList .goodListItem.lookMore {
		display: table;
	}

	.selectGoodsList .goodListItem .goodsTitle {
		width: 100%;
		height: 80upx;
		line-height: 80upx;
		background: #60bccc;
		box-sizing: border-box;
		font-size: 32upx;
		padding: 0upx 15upx;
		color: #FFF;
		position: relative;
	}

	.selectGoodsList .goodListItem .goodsTitle button {
		position: absolute;
		height: 50upx;
		line-height: 50upx;
		font-size: 24upx;
		text-align: center;
		border-radius: 30upx;
		border: none;
		background: #FFF;
		right: 15upx;
		top: 15upx;
		color: #5d5d5d;
	}

	.selectGoodsList .goodListItem .goods-itemWrap {
		width: 100%;
		box-sizing: border-box;
		padding: 0upx 15upx;
		height: 60upx;
		line-height: 60upx;
		display: flex;
	}

	.selectGoodsList .goodListItem .goods-itemWrap text {
		flex: 1;
	}

	.btn_width {
		width: 23%;
		background: rgba(124, 170, 216, 1)  !important;
	}

	.btn_color {
		background-color:red  !important;
	}
	//表格单据
	.orderList {
		width: 100%;
		overflow: auto;
		box-sizing: border-box;
	
		text {
			float: left;
			text-align: center;
			box-sizing: border-box;
			height: 40px;
			line-height: 40px;
			border-right: 1px solid #CCC;
			white-space: nowrap;
			text-overflow: ellipsis;
			overflow: hidden;
	
			&:last-child {
				border: none;
			}
		}
	
		.orderNav {
			height: 40px;
			line-height: 40px;
			box-sizing: border-box;
			overflow: hidden;
			border-top: 1px solid #CCC;
			border-left: 1px solid #FFF;
			background: #FFF;
	
		}
	
		.orderLi {
	
			background: #ebebeb;
			overflow: auto;
	
			.orderItem {
				height: 40px;
				line-height: 40px;
				width: 100%;
				border: 1px solid #ebebeb;
				box-sizing: border-box;
				display: table;
				border-bottom: 1px solid #CCCCCC;
	
				view {
					display: inline-block;
					height: 100%;
					line-height: 35px;
					float: left;
					text-align: center;
					border-right: 1px solid #CCC;
					box-sizing: border-box;
					padding-top: 5upx;
					padding-bottom: 5upx;
					white-space: nowrap;
					text-overflow: ellipsis;
					overflow: hidden;
	
					image {
						width: 60px;
						margin: auto;
						display: table;
					}
	
					&:last-child {
						border: none;
					}
	
				}
			}
		}
	
		.allPrice {
			@extend .orderNav;
			background: rgba(124, 170, 216, 1);
			color: #FFF;
		}
		.background{
			background-color: #fff;
		}
	}
	.inpt1 .content_item{
		 flex:1;
		  display: flex;
		 align-items: center;
		
	}.inpt1 .content_item text{
		 margin-left: 5px;
		
	}
</style>
